home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BMUG Revelations
/
BMUG Revelations.toast
/
Programming
/
Programming Languages
/
Pocket 6.3
/
Extensions
/
Starting
/
Chapter 12
/
Buzz
next >
Wrap
Text File
|
1993-06-11
|
2KB
|
41 lines
\ Buzz demo from Starting Forth
\ NOTE: If it says: ' UM* ? ' below,
\ load the file 'Brodie' first.
forget task : task ;
: EVEN ( n -- n' ) dup 2 mod + ; \ round up to even number
: " 34 word c@ here 1+ over here swap even allot rot cmove ;
variable RND here rnd !
: RANDOM ( -- ) rnd @ 31421 * 6927 + dup rnd even ! ;
: CHOOSE ( u -- u' ) random um* swap drop ;
create BUZZWORDS ( -- addr )
" integrated management criteria "
" total organization flexability "
" systematized monitored capability "
" parallel reciprocal mobility "
" functional digital programming "
" responsive logistical concepts "
" optimal transitional time phasing "
" synchronized incremental projections "
" compatible third generation hardware "
" qualified policy through-put "
" partial decision engineering "
: BUZZWORD ( row# column# -- addr )
20 * swap 64 * + buzzwords + ;
: .BUZZWORD ( r# c# -- ) buzzword 20 -trailing type ;
: 1ADJECTIVE 10 choose 0 .buzzword ;
: 2ADJECTIVE 10 choose 1 .buzzword ;
: NOUN 10 choose 2 .buzzword ;
: PHRASE 1adjective space 2adjective space noun ;
: PARAGRAPH
cr ." By using " phrase ." coordinated with "
cr phrase ." it is possible for even the most "
cr phrase ." to function as "
cr phrase ." within the constraints of "
cr phrase ." ." ;
paragraph